﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace DusonFramework.Config.Test
{
    using DusonFramework.Config.DotNetConfig;

    public class Settings : SectionBaseHandler<Settings>
    {
        /// <summary>
        /// 日志保存的路径（可为相对应用程序的路径）
        /// </summary>
        [ConfigurationProperty("logPath", DefaultValue = ".\\Logs\\")]
        public string LogPath
        {
            get { return (string)this["logPath"]; }
        }

        /// <summary>
        /// 日志文件名规则，遵循<see cref="DateTime"/>的格式化表达式
        /// </summary>
        [ConfigurationProperty("logFile", DefaultValue = @"\\yyyy\\MM\\dd\\HH\.\t\x\t")]
        public string LogFile
        {
            get { return (string)this["logFile"]; }
        }
    }
}
